"""
**Smaller models should have lower quality but show no significant quality loss in checks.

Usage:

1. Install dependencies:
   sudo apt-get install portaudio19-dev
   pip install kokoro-onnx sounddevice
2. Download a model (choose one):
   - INT8 (88MB):
     wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.int8.onnx
   - FP16 (169MB):
     wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.fp16.onnx
3. Download voices-v1.0.bin:
   wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.bin
4. Run example:
   python examples/with_quant.py <chosen_model>
"""

import sounddevice as sd
from kokoro_onnx import Kokoro
import sys

kokoro = Kokoro(sys.argv[1], "voices-v1.0.bin")
samples, sample_rate = kokoro.create(
    "Hello. This audio generated by kokoro!", voice="af_sarah", speed=1.0, lang="en-us"
)
print("Playing audio...")
sd.play(samples, sample_rate)
sd.wait()
